testuite: Add opacity-overdraw test
authorBenjamin Otte <otte@redhat.com>
Wed, 15 Sep 2021 05:37:57 +0000 (07:37 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 16 Sep 2021 21:59:37 +0000 (23:59 +0200)
Tests that overdrawing of content inside an opacity node happens before
the opacity is applied.

This is broken in the GL renderer and causes the opacity.ui reftest to
fail.

testsuite/gsk/compare/opacity-overdraw.node [new file with mode: 0644]
testsuite/gsk/compare/opacity-overdraw.png [new file with mode: 0644]
testsuite/gsk/meson.build

diff --git a/testsuite/gsk/compare/opacity-overdraw.node b/testsuite/gsk/compare/opacity-overdraw.node
new file mode 100644 (file)
index 0000000..78057f4
--- /dev/null
@@ -0,0 +1,15 @@
+opacity {
+  child: transform {
+    transform: translate(15, 15);
+    child: container {
+      color {
+        bounds: -15 -15 30 30;
+        color: rgb(0,0,255);
+      }
+      color {
+        bounds: -10 -10 20 20;
+        color: rgb(255,0,0);
+      }
+    }
+  }
+}
diff --git a/testsuite/gsk/compare/opacity-overdraw.png b/testsuite/gsk/compare/opacity-overdraw.png
new file mode 100644 (file)
index 0000000..4499664
Binary files /dev/null and b/testsuite/gsk/compare/opacity-overdraw.png differ
index d225653491f19050867a88e40a95caa0ed1bfde3..5ba5f735204ba14f7056c3aca04b75fa8475e3e0 100644 (file)
@@ -62,6 +62,7 @@ compare_render_tests = [
   'issue-3615',
   'nested-rounded-clips',
   'opacity_clip',
+  'opacity-overdraw',
   'opacity-overlapping-children',
   'outset_shadow_offset_both',
   'outset_shadow_offset_x',